package com.seelyn.ddvideo.utils;

import com.seelyn.ddvideo.model.VideoPrefix;
import com.seelyn.ddvideo.repository.VideoPrefixRepository;
import com.seelyn.ddvideo.service.VideoPrefixService;
import org.springframework.data.domain.Sort;

import java.util.List;

/**
 * @author slacrey
 * @since 2017/6/14
 */
public class VideoPrefixUtils {

    public static String handlerPrefix(VideoPrefixService prefixService, String fromSite) {
        VideoPrefix videoPrefix = prefixService.findByFromSite(fromSite);
        if (videoPrefix != null) {
            return videoPrefix.getPrefixUrl();
        }
        return null;
    }

}
